package com.starlight.flower_server.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName flower_knowledge
 */
@TableName(value ="flower_knowledge")
@Data
public class FlowerKnowledge implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 创建者
     */
    private String creator;

    /**
     * 修改者
     */
    private String modifier;

    /**
     * 创建时间
     */
    private Date created;

    /**
     * 修改时间
     */
    private Date modified;

    /**
     * 是否删除
     */
    private Integer isDeleted;

    /**
     * 名称
     */
    private String name;

    /**
     * 花图片
     */
    private String picture;

    /**
     * 别名
     */
    private String otherName;

    /**
     * 原产地
     */
    private String origin;

    /**
     * 花期
     */
    private String florescence;

    /**
     * 日照
     */
    private String sunshine;

    /**
     * 温度
     */
    private String temperature;

    /**
     * 土壤
     */
    private String soil;

    /**
     * 水分
     */
    private String moisture;

    /**
     * 花语
     */
    private String language;

    /**
     * 栽种
     */
    private String plant;

    /**
     * 施肥
     */
    private String manure;

    /**
     * 浇水
     */
    private String water;

    /**
     * 温度、光照
     */
    private String temperatureLight;

    /**
     * 防护
     */
    private String protect;

    /**
     * 繁殖
     */
    private String breed;

    /**
     * 小贴士
     */
    private String tip;

    /**
     * 商品id
     */
    private Long itemId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FlowerKnowledge other = (FlowerKnowledge) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCreator() == null ? other.getCreator() == null : this.getCreator().equals(other.getCreator()))
            && (this.getModifier() == null ? other.getModifier() == null : this.getModifier().equals(other.getModifier()))
            && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()))
            && (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPicture() == null ? other.getPicture() == null : this.getPicture().equals(other.getPicture()))
            && (this.getOtherName() == null ? other.getOtherName() == null : this.getOtherName().equals(other.getOtherName()))
            && (this.getOrigin() == null ? other.getOrigin() == null : this.getOrigin().equals(other.getOrigin()))
            && (this.getFlorescence() == null ? other.getFlorescence() == null : this.getFlorescence().equals(other.getFlorescence()))
            && (this.getSunshine() == null ? other.getSunshine() == null : this.getSunshine().equals(other.getSunshine()))
            && (this.getTemperature() == null ? other.getTemperature() == null : this.getTemperature().equals(other.getTemperature()))
            && (this.getSoil() == null ? other.getSoil() == null : this.getSoil().equals(other.getSoil()))
            && (this.getMoisture() == null ? other.getMoisture() == null : this.getMoisture().equals(other.getMoisture()))
            && (this.getLanguage() == null ? other.getLanguage() == null : this.getLanguage().equals(other.getLanguage()))
            && (this.getPlant() == null ? other.getPlant() == null : this.getPlant().equals(other.getPlant()))
            && (this.getManure() == null ? other.getManure() == null : this.getManure().equals(other.getManure()))
            && (this.getWater() == null ? other.getWater() == null : this.getWater().equals(other.getWater()))
            && (this.getTemperatureLight() == null ? other.getTemperatureLight() == null : this.getTemperatureLight().equals(other.getTemperatureLight()))
            && (this.getProtect() == null ? other.getProtect() == null : this.getProtect().equals(other.getProtect()))
            && (this.getBreed() == null ? other.getBreed() == null : this.getBreed().equals(other.getBreed()))
            && (this.getTip() == null ? other.getTip() == null : this.getTip().equals(other.getTip()))
            && (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode());
        result = prime * result + ((getModifier() == null) ? 0 : getModifier().hashCode());
        result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
        result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPicture() == null) ? 0 : getPicture().hashCode());
        result = prime * result + ((getOtherName() == null) ? 0 : getOtherName().hashCode());
        result = prime * result + ((getOrigin() == null) ? 0 : getOrigin().hashCode());
        result = prime * result + ((getFlorescence() == null) ? 0 : getFlorescence().hashCode());
        result = prime * result + ((getSunshine() == null) ? 0 : getSunshine().hashCode());
        result = prime * result + ((getTemperature() == null) ? 0 : getTemperature().hashCode());
        result = prime * result + ((getSoil() == null) ? 0 : getSoil().hashCode());
        result = prime * result + ((getMoisture() == null) ? 0 : getMoisture().hashCode());
        result = prime * result + ((getLanguage() == null) ? 0 : getLanguage().hashCode());
        result = prime * result + ((getPlant() == null) ? 0 : getPlant().hashCode());
        result = prime * result + ((getManure() == null) ? 0 : getManure().hashCode());
        result = prime * result + ((getWater() == null) ? 0 : getWater().hashCode());
        result = prime * result + ((getTemperatureLight() == null) ? 0 : getTemperatureLight().hashCode());
        result = prime * result + ((getProtect() == null) ? 0 : getProtect().hashCode());
        result = prime * result + ((getBreed() == null) ? 0 : getBreed().hashCode());
        result = prime * result + ((getTip() == null) ? 0 : getTip().hashCode());
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", creator=").append(creator);
        sb.append(", modifier=").append(modifier);
        sb.append(", created=").append(created);
        sb.append(", modified=").append(modified);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", name=").append(name);
        sb.append(", picture=").append(picture);
        sb.append(", otherName=").append(otherName);
        sb.append(", origin=").append(origin);
        sb.append(", florescence=").append(florescence);
        sb.append(", sunshine=").append(sunshine);
        sb.append(", temperature=").append(temperature);
        sb.append(", soil=").append(soil);
        sb.append(", moisture=").append(moisture);
        sb.append(", language=").append(language);
        sb.append(", plant=").append(plant);
        sb.append(", manure=").append(manure);
        sb.append(", water=").append(water);
        sb.append(", temperatureLight=").append(temperatureLight);
        sb.append(", protect=").append(protect);
        sb.append(", breed=").append(breed);
        sb.append(", tip=").append(tip);
        sb.append(", itemId=").append(itemId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}